<?php
namespace app\index\model;

use think\Db;
use think\Model;

class TctReport extends Model
{
    /*t_log_bl
    病理日志
    t_log_TCT
    TCT 日志*/
    protected $dbName = 'blsjk';
    protected $table = 'T_tctbgd';

    //返回TCT的样本信息 根据id
    public function GetReportTctInfoByYbid($str){
        $data = [];
        /*return $this->db()->where('ybid',$str)->select();*/
        return $data = Db::connect("database_Bl")->table("T_tctbgd")->where('ybid',$str)->select();
    }

    //根据tct的样本信息  根据姓名
    public  function  GetTctReportInfoByBrxm($str){
        return $data = Db::connect("database_Bl")->table("T_tctbgd")->where('brxm',$str)->select();
    }

    //返回TCT的样本信息 根据tct的编号  blbh
    public function GetReportTctInfoByBlbh($str){
        $data = [];
        /*return $this->db()->where('ybid',$str)->select();*/
        return Db::connect("database_Bl")->table("T_tctbgd")->where('xbblxh',$str)->select();
    }

    //updatetct 方法
    public function updatetct($yid,$res = array()){
        return Db::connect('database_Bl')->table("T_tctbgd")->where(array('ybid' => $yid))->update($res);
    }

}